<!DOCTYPE html>
<html>
<head>
    <title>SPA</title>
    <meta http-equiv=Content-Type content="text/html" charset='utf-8'>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="telephone=no" name="format-detection">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="classification" content="">
    <link rel="apple-touch-icon-precomposed" sizes="57x57" href="public/resource/img/57.png">
</head>
<body>
</body>
    <script src="public/component/seajs/2.3.0/sea.js"></script>
    <script src="public/component/seajs/2.3.0/seajs-css.js"></script>
    <script src="public/component/seajs/2.3.0/seajs-text.js"></script>
    <script>
    // For development
    if (location.href.indexOf("?dev") > 0) {
        var domain = 'http://www.spa.com',
            remoteUrl = 'http://www.spa.com/public';
    }  else {
        var domain = 'http://www.spa.com',
            remoteUrl = 'http://www.spa.com/public';
    }

    seajs.config({
        alias: {
            "$": "public/component/zepto/zepto.min.js",
            "backbone": "public/component/backbone/1.1.2/backbone.js",
            "underscore": "public/component/underscore/1.7.0/underscore.js",
        },

        preload: [],

        paths: {},

        vars: {
            'component': remoteUrl+'/component/', 
            'controller' : domain+'/controller/',
            'view': domain+'/view/',
            'resourceUrl': remoteUrl+'/resource/',
        },

        'map': [
                //[/^(.*\.(?:css|js))(.*)$/i, '$1?v='+Math.random()]
                [/^(.*\.(?:css|js))(.*)$/i, '$1?v=1.0']
        ],

        debug: true,

        base: '/',

        charset: 'utf-8'
    });

    seajs.use(['app'],function(app){
        $(function() {app.init()});
    });

    </script>
</html>
